package com.insta.bankSystem;

/**
 * Strategy that withdraws the yearly fees on an account-derived object.
 */
public class YearlyFeesStrategy extends StrategyBase<AccountBase>
{

    @Override
    public void run(AccountBase account)
    {
        if (account instanceof StandardAccount)
        {
            account.Withdraw(100);
            
        } 
        else if (account instanceof SilverAccount)
        {
            account.Withdraw(10);

        } 
        else if (account instanceof GoldAccount)
        {
            account.Withdraw(1);
        }
    }

}
